/*
 *    公表管理
 * Author: lengleng (wangiegie@gmail.com)
 */

import request from "@/router/axios";

// 获取列表
export function fetchList(query) {
  return request({
    url: "/meter/mrpublicmeterwriterecord/page",
    method: "get",
    params: query
  });
}

export function addObj(obj) {
  return request({
    url: "/estate/rmproject",
    method: "post",
    data: obj
  });
}

export function getObj(id) {
  return request({
    url: "/estate/rmproject/" + id,
    method: "get"
  });
}

export function delObj(id) {
  return request({
    url: "/estate/rmproject/" + id,
    method: "delete"
  });
}

export function putObj(obj) {
  return request({
    url: "/estate/rmproject",
    method: "put",
    data: obj
  });
}

// 获取记录
export function getRecordDetails(obj) {
  return request({
    url: "/meter/mrpublicmeterwriterecord/queryAddRecordInfo",
    method: "get",
    params: obj
  });
}

// 提交
export function saveRecordDetails(obj) {
  return request({
    url: "/meter/mrpublicmeterwriterecord/saveRecordDetails",
    method: "post",
    data: obj
  });
}

// 查看详情
export function getViewItem(obj) {
  return request({
    url: "/meter/mrpublicmeterwriterecord/getRecordDetails",
    method: "get",
    params: obj
  });
}

// 查看编辑保存
export function viewSave(obj) {
  return request({
    url: "/meter/mrpublicmeterwriterecord",
    method: "put",
    data: obj
  });
}

// 导入
export function ImportFile(obj) {
  return request({
    url: "/meter/mrpublicmeterwriterecord/inputPublicMeter",
    method: "post",
    data: obj
  });
}
// 获取公表历史记录
export function getRecordHistory(obj) {
  return request({
    url: "/meter/mrpublicmeterwriterecord/getRecordHistory",
    method: "get",
    params: obj
  });
}
